<?php require_once("header.php");?>      
<?php $recipes = json_decode(api("all_recipes/".$user_id,"GET",null),true);?>     

<h3>Your Recipes</h3>
<div class="recipe_carousel">
<?php foreach($recipes as $recipe):?>
<?php if($recipe['author']==$user_id):?>
        <div>
            <img alt="" src="php/photo.php?recipe_id=<?php echo $recipe['rid'];?>" /><br />
            <input type="hidden" value="<?php echo $recipe['rid'];?>" />
            <div class="recipe-details"><?php echo $recipe['name'];?></div>
        </div>
<?php endif;?>
<?php endforeach;?>
</div><!-- carousel -->

<h3>Friends' & Public Recipes</h3>
<div class="recipe_carousel">
<?php foreach($recipes as $recipe):?>
<?php if($recipe['author']!=$user_id):?>
        <div>
            <img alt="" src="php/photo.php?recipe_id=<?php echo $recipe['rid'];?>" /><br />
            <input type="hidden" value="<?php echo $recipe['rid'];?>" />
            <div class="recipe-details"><?php echo $recipe['name'];?></div>
        </div>
<?php endif;?>
<?php endforeach;?>
</div><!-- carousel -->

<?php require_once("footer.php");?>    